<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<%@include file="/views/common/include/taglib.jsp"%>
<%@include file="/views/common/include/head.jsp"%>
<link rel="stylesheet" href="${ctx}/css/page/header2.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/reset.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/ts-demo.css"type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/footer.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/leftList.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/xqtz.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/page.css" type="text/css">
<link rel="stylesheet" href="${ctx}/css/page/usualProblem.css" type="text/css">
</head>

<body>
    <jsp:include page="/views/common/head_main.jsp" />
    <div class="bg">
    <input type="hidden" id="item" value="${sessionScope.item_personal}"/>
        <div class="contentbox contentbox1">
            <div class="padd1">
                <!--左导航 -->
                <div class="left-list">
                    <ul>
                        <li class="all"><a href="">
                        <img class="font-icon" src="${ctx}/images/xqtz/xq7.png" />全部<span class="fuhao fh-color">∨</span></a></li>
                        <li class="sub-list"><a href="">
                        <img class="font-icon" src="${ctx}/images/xqtz/xq9.png" />购物指南<span class="fuhao">＞</span></a></li>
                        <li class="sub-list"><a href="">
                        <img class="font-icon" src="${ctx}/images/xqtz/xq8.png" />物业报修<span class="fuhao">＞</span></a></li>
                        <li class="sub-list"><a href="javascript:void(0)">
                        <img class="font-icon" src="${ctx}/images/xqtz/xq9.png" />物业、停车费<span class="fuhao">＞</span></a></li>
                    </ul>
                </div>
                <!-- 右边编辑栏 -->
                <div class="rightbox">
                    <div id="first" style="background: #d6eaf1;">
                        <div class="content" style="padding-top:30px;margin-top:0px;">
                                <div class="div-bbb">
                                    <div class="div-ccc"></div>
                                    <span class="span-a">物业报修常见问题</span>
                                    <div class="div-aaa"><a class="a-aaa"href="${ctx}/main?item=6">＜＜ 返回</a></div>
                                 </div>
                                <hr class="hr-aaa"/>
                          
                           <div class="form">
                                <table class="table-f">
								    <c:forEach items="${helpManuals.list}" var="item" varStatus="itemStatus">
									<tr id="line${item.id}">
									   <td width="75%" class="a-title" onclick="selectOne(${item.id})"><span id="bb${item.id}">＞</span><span class="span-vvv" id="cc${item.id}">∨</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${item.title}</td>
									   <td class="td-q"><fmt:formatDate value="${item.sendTime}" pattern="yyyy-MM-dd     HH:mm" /></td>
									</tr>	
									<tr id="aa${item.id}" style="display:none;">
									<td class="a-title" width="75%"><span class="span-bbb">最佳答案：</span>${item.answer}
                                    </td>
                                    <td>
                                    </td>
									</tr>	
									</c:forEach>
                               </table>
                             </div>
                       
                       <div class="page">
						<input id="pages" type="hidden" value="${helpManuals.pages}">
							<ul>
								<li><a class="last-page page-change " onclick="gotoPage(${currentPage-1 });">&lt;上一页</a></li>
								<c:if test="${helpManuals.firstPage > 1}">
									<li onclick="gotoPage(1);"
										class="page-num"><a>1</a></li>
									<c:if test="${helpManuals.firstPage > 2}">
		                       		...
		                       		</c:if>
								</c:if>
								<c:forEach items="${helpManuals.navigatepageNums }" var="page">
									<li onclick="gotoPage(${page });"
										class="<c:if test="${currentPage == page }">current</c:if>"
										class="page-num"><a>${page}</a></li>
								</c:forEach>
								<c:if test="${helpManuals.lastPage < helpManuals.pages}">
									<c:if test="${helpManuals.firstPage < helpManuals.pages - 1}">
		                       		...
		                       		</c:if>
									<li onclick="gotoPage(${helpManuals.pages});"
										class="page-num"><a>${helpManuals.pages}</a>
									</li>
								</c:if>
								<li><a class="next-page page-change" onclick="gotoPage(${currentPage+1 });">下一页&gt;</a></li>
							</ul>
						</div>
                             
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
<jsp:include page="/views/common/footer.jsp" />
<script src="${ctx}/js/controllers/usualQuestions/RepairUsualQuestionsController.js"type="text/javascript"></script>
<script type="text/javascript">
var ctx = '${ctx}';
setCtx(ctx);

//跳转到列表页面
function gotoPage(page) {
	var pages = $("#pages").val();
	if(page == null || page == 'undefined'){
		page = this.page;
	}
	if(page < 1 ){
		layer.msg("已到达第一页!", {
			time : 2000
		// 2秒关闭（如果不配置，默认是3秒）
		});
	} else if(page > pages){
		layer.msg("已到达最后一页!", {
			time : 1000
		// 2秒关闭（如果不配置，默认是3秒）
		});
	} else {
		window.location.href= ctx + "/propertyRepair/infoList?pNo=" + page; 
	}
	
}
function gotoShowDetails(id){
    $('#first').load(ctx+"/propertyRepair/showDetails?id="+id);
}
$(function () {
    $(".a-title").click(function(){ 
        $("").toggle();
        });
});
function setCtx(ctx) {
    this.ctx = ctx;
    
}
function selectOne(id) {
        $("#aa" + id).toggle();   
        $("#bb" + id).toggle();   
        $("#cc" + id).toggle(); 
        $("#line" + id).css({"border":"none"}); 
}
</script>
</body>
</html>